package com.yuan.java多线程复习;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/*
 *  @author 雨安
 *  类名： ThreadTest
 *  创建时间：2024/4/29
 */
public class ThreadTest {
    public static void main(String[] args) {
        ExecutorService executorService = Executors.newFixedThreadPool(2);

        executorService.submit(()->{
            System.out.println("线程1执行");
        });

        executorService.submit(()->{
            System.out.println("线程2执行");
        });

        executorService.shutdown();
    }
}
